package com.koron.tool.util;

import java.sql.Connection;
import java.sql.ResultSet;

/**
 * Created by Administrator on 2016/11/26.
 */
public class TableUtil {

    public static boolean isExists(Connection conn,String tableName){
        try {
            ResultSet resultSet = conn.getMetaData().getTables(null, null, tableName, null);
            return resultSet.getRow()>0;
        }catch (Throwable t){
            t.printStackTrace();
            throw new RuntimeException(t);
        }

    }


}
